package com.ymttest.database.sqlwapper;

import java.util.List;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.YmtOrders;

public class YmtOrdersIMapper {
	SqlManager manage;

	public YmtOrdersIMapper() {
		manage = new SqlManager("ymtsit1");
	}



	public List<YmtOrders> selectbySellerId(Integer sellerId) throws InterruptedException {
	    @SuppressWarnings("unchecked")
	    List<YmtOrders>  aa = manage.getSelectResults(
	            "com.ymttest.database.mapping.YmtOrdersMapper.selectbySellerId", sellerId);
	    manage.commit();
	    return aa;
	}
	
	public List<YmtOrders> selectbyStatus(int iTradingStatus) throws InterruptedException {
	    @SuppressWarnings("unchecked")
	    List<YmtOrders>  aa = manage.getSelectResults(
	            "com.ymttest.database.mapping.YmtOrdersMapper.selectbyStatus", iTradingStatus);
	    manage.commit();
	    return aa;
	}
	
	

	public static void main(int sellerId) throws InterruptedException {
    	System.out.print(new YmtOrdersIMapper().selectbyStatus(3).get(0).getIbuyerid());
    	
	}
}
